libxl: fork: Make SIGCHLD self-pipe nonblocking
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 21 Jan 2014 15:05:37 +0000 (15:05 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 6 Feb 2014 14:21:04 +0000 (14:21 +0000)
commit4727e87352f59150eece4f1deb94495589898cf6
tree123565dd070fd89628019506ec96a2a0bc618873
parentd9a20c6040910aeb0910e5c71d45465dccca6923
libxl: fork: Make SIGCHLD self-pipe nonblocking

Use the new libxl__pipe_nonblock and _close functions, rather than
open coding the same logic.  Now the pipe is nonblocking, which avoids
a race which could result in libxl deadlocking in a multithreaded
program.

Reported-by: Jim Fehlig <jfehlig@suse.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Jim Fehlig <jfehlig@suse.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_fork.c